package io.shuttle.mbe.api

import io.shuttle.mbe.api.annotation.ChromeMinVersion
import org.w3c.dom.Element

////////////////////
// DOM
////////////////////
/**
 * Use the `Browser.dom` API to access special DOM APIs for Extensions
 * @since Chrome 88
 */
@ChromeMinVersion(88)
interface Dom {
    // Gets the open shadow root or the closed shadow root hosted by the specified element.
    // If the element doesn't attach the shadow root, it will return null.
    // @return ShadowRoot? the shadow root hosted by the element
    @ChromeMinVersion(88)
    fun openOrClosedShadowRoot(element: Element): Element
}